﻿<UserControl x:Class="TradeMo.CriteriaBikesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    mc:Ignorable="d"
	d:DataContext="{d:DesignData SampleData/CriteriaBikesSampleData.xaml}"
			 
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignWidth="480">

	<Grid x:Name="LayoutRoot">
		<VisualStateManager.CustomVisualStateManager>
			<ic:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
		<Grid.Projection>
			<PlaneProjection CenterOfRotationY="0"/>
		</Grid.Projection>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="0:0:0.3">
						<VisualTransition.GeneratedEasingFunction>
							<CubicEase EasingMode="EaseIn"/>
						</VisualTransition.GeneratedEasingFunction>
					</VisualTransition>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="VisibleState"/>
				<VisualState x:Name="HiddenState">
					<Storyboard>
						<DoubleAnimation Duration="0" To="-90" Storyboard.TargetProperty="(UIElement.Projection).(PlaneProjection.RotationX)" Storyboard.TargetName="LayoutRoot" d:IsOptimized="True"/>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Border BorderThickness="3" Width="480" HorizontalAlignment="Center" Background="{StaticResource PhoneChromeBrush}">
			<Grid>
				<Grid.RowDefinitions>
					<RowDefinition Height="Auto"/>
					<RowDefinition/>
					<RowDefinition Height="Auto"/>
				</Grid.RowDefinitions>
				<TextBlock HorizontalAlignment="Center" Text="Motorbike Search Criteria" />
				<StackPanel Grid.Row="1" >
					<Grid x:Name="RegionGrid" MouseLeftButtonUp="RegionGrid_MouseLeftButtonUp">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="REGION" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding RegionName}" Margin="12,0,0,0"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None"/>
					</Grid>
					<Grid x:Name="TypeGrid" MouseLeftButtonUp="TypeGrid_MouseLeftButtonUp">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="Style" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding TypeName}" Margin="12,0,0,0"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None"/>
					</Grid>
					<Grid x:Name="MakeGrid" MouseLeftButtonUp="MakeGrid_MouseLeftButtonUp">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="Make" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding MakeName}" Margin="12,0,0,0"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None"/>
					</Grid>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="ENGINE SIZE" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding EngineSizeFromName}" Margin="12,0,0,0" MouseLeftButtonUp="EngineSizeFrom_MouseLeftButtonUp"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None" MouseLeftButtonUp="EngineSizeFrom_MouseLeftButtonUp"/>
						<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding EngineSizeToName}" Margin="12,0,0,0" MouseLeftButtonUp="EngineSizeTo_MouseLeftButtonUp" />
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="3" Stretch="None" MouseLeftButtonUp="EngineSizeTo_MouseLeftButtonUp"/>
					</Grid>
					<Grid>
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="PRICE RANGE" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding PriceFromName}" Margin="12,0,0,0" MouseLeftButtonUp="PriceFrom_MouseLeftButtonUp"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None" MouseLeftButtonUp="PriceFrom_MouseLeftButtonUp"/>
						<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding PriceToName}" Margin="12,0,0,0" MouseLeftButtonUp="PriceTo_MouseLeftButtonUp" />
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="3" Stretch="None" MouseLeftButtonUp="PriceTo_MouseLeftButtonUp"/>
					</Grid>
					<Grid x:Name="SortByGrid" MouseLeftButtonUp="SortByGrid_MouseLeftButtonUp">
						<Grid.ColumnDefinitions>
							<ColumnDefinition/>
							<ColumnDefinition Width="Auto"/>
						</Grid.ColumnDefinitions>
						<Grid.RowDefinitions>
							<RowDefinition Height="Auto"/>
							<RowDefinition/>
						</Grid.RowDefinitions>
						<TextBlock Text="SORT BY" Style="{StaticResource PhoneTextSmallStyle}" FontSize="13.333"/>
						<TextBlock Grid.Row="1" Text="{Binding SortByName}" Margin="12,0,0,0"/>
						<Image Grid.RowSpan="2" Source="icons/appbar.next.rest.png" Grid.Column="1" Stretch="None"/>
					</Grid>
				</StackPanel>
                <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Center" >
                    <Button x:Name="ResetButton" Content="reset" Width="200" Click="ResetButton_Click" />
                    <Button x:Name="RefreshButton" Content="Search" Width="200" Click="RefreshButton_Click"  />
                </StackPanel>
            </Grid>
		</Border>

	</Grid>
</UserControl>
